package day06;
//数组的演示
import  java.util.Arrays;
public class ArrayDemo {
    public static void main(String[] args) {
        //6)数组的复制：
        /*
        int[] a = {15,25,35,45,48,59};
        int[] b = new int[7];//0,0,0,0,0,0,0
        //a:原数组
        //2:原数组的起始下标
        //b:目标数组
        //0:目标数组的起始下标
        //3:要复制的元素个数
        System.arraycopy(a,2,b,0,3);
        for (int i =0 ; i<b.length; i++){
            System.out.println(b[i]);


         */
        int [] a = {15,25,35,45,55};
        a = Arrays.copyOf(a,a.length+1);
        for (int i = 0 ;i<a.length ; i++){
            System.out.println(a[i]);







        }








    }
}
